/**
 * 
 */
package org.codesketch.controller.domain;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.codesketch.birch.common.Instance;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * Defines the expected AWS environments.
 * @author quirino.brizi@gmail.com
 *
 */
@Document
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Environment {

	/*
	 * General information
	 */
	@Id
	private Integer id;
	private String name;
	private String description;
	/*
	 * Instance specific information
	 */
	private Integer numOfInstance;
	private String imageId;
	private List<String> securityGroups;
	private String instanceType;
	/*
	 * SSH information
	 */
	private String username;
	private String privateKey;
	/*
	 * Runtime information
	 */
	@Transient
	private List<Instance> instances;
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @return the numOfInstance
	 */
	public Integer getNumOfInstance() {
		return numOfInstance;
	}
	/**
	 * @return the imageId
	 */
	public String getImageId() {
		return imageId;
	}
	/**
	 * @return the securityGroups
	 */
	public List<String> getSecurityGroups() {
		return securityGroups;
	}
	/**
	 * @return the instanceType
	 */
	public String getInstanceType() {
		return instanceType;
	}
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * @return the privateKey
	 */
	public String getPrivateKey() {
		return privateKey;
	}
	/**
	 * @return the instances
	 */
	public List<Instance> getInstances() {
		return instances;
	}
	/**
	 * @param instances the instances to set
	 */
	public void setInstances(List<Instance> instances) {
		this.instances = instances;
	}
}
